package com.foreveredu.propms.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Description:<br/>
 * 领域模型：账户交易类，记录账户交易详情<br/>
 * Date:<br/>
 * 2013/8/3<br/>
 * 
 * @author hushigang
 */

@Entity
@Table(name = "T_Exchange")
public class Exchange {

	private int id;
	private Account account;// 所属账户
	private float deposit;// 存入金额
	private float withdraw;// 取出金额
	private float balance;// 余额
	private String extime;// 交易时间

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@ManyToOne
	@JoinColumn(name = "account_id")
	public Account getAccount() {
		return account;
	}

	public void setAccount(Account account) {
		this.account = account;
	}

	@Column
	public float getDeposit() {
		return deposit;
	}

	public void setDeposit(float deposit) {
		this.deposit = deposit;
	}

	@Column
	public float getWithdraw() {
		return withdraw;
	}

	public void setWithdraw(float withdraw) {
		this.withdraw = withdraw;
	}

	@Column
	public float getBalance() {
		return balance;
	}

	public void setBalance(float balance) {
		this.balance = balance;
	}

	@Column
	public String getExtime() {
		return extime;
	}

	public void setExtime(String extime) {
		this.extime = extime;
	}

}
